home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr20 / spr_cut.zip / PICVIEW.H < prev   
C/C++ Source or Header  |  1995-03-10  |  2KB  |  60 lines

  1. /* ---------------------------------------------------- */
  2. /* (c) 1995 Niksoft International                       */
  3. /* SPRITE CUTTER UTILITY v2.0                           */
  4. /* ---------------------------------------------------- */
  5. /* PICVIEW.H                                            */
  6. /* Image file management module                         */
  7. /* ---------------------------------------------------- */
  8.  
  9. #ifndef __RGBCOLOR
  10.  
  11. #define __RGBCOLOR
  12.  
  13. typedef struct {
  14.  
  15.                 char red;
  16.                 char green;
  17.                 char blue;
  18.  
  19.                } RGB_color;
  20.  
  21. #endif
  22.  
  23.  
  24. #ifndef __PICTURE
  25.  
  26. #define __PICTURE
  27.  
  28. typedef struct {
  29.  
  30.                 RGB_color palette[256];
  31.                 char far *buffer;
  32.  
  33.                } picture;
  34.  
  35. #endif
  36.  
  37. #define PALETTE_MASK       0x3C6
  38. #define PALETTE_REG_READ   0x3C7
  39. #define PALETTE_REG_WRITE  0x3C8
  40. #define PALETTE_DATA       0x3C9
  41.  
  42. #define NO_SET             0
  43. #define SET                1
  44.  
  45. extern int init_PIC(picture *);
  46. /* Initializes the structure that holds the image datas.              */
  47. /* Returns -1 if there's not enough memory to hold that image bitmap. */
  48.  
  49. extern int PCX_load(char *, picture *);
  50. /* Loads into the structure a .PCX format image file */
  51. /* Returns -1 if an error occurs.                    */
  52.  
  53.  
  54. extern void Show_picture(picture *, unsigned);
  55. /* Puts the image stored in the structure.      */
  56. /* It sets the palette if requested.            */
  57.  
  58. extern void PIC_free(picture *);
  59. /* Frees the image structure buffer. */
  60.